package com.desktopmng.action;

import org.apache.struts2.config.Result;
import org.apache.struts2.config.Results;

@SuppressWarnings("serial")
@Results( { @Result(value = "/common/message.jsp"),
		@Result(name = "addInfo", value = "/resources/jsp/login.jsp"),
		@Result(name = "modifyInfo", value = "/resources/jsp/login1.jsp"),
		@Result(name = "saveInfo", value = "/resources/jsp/main.jsp") })
public class LoginAction extends BaseAction {
	
	public String addInfo() {
		return ADDINFO;
	}
	
	public String modifyInfo() {
		return MODIFYINFO;
	}
	
	public String saveInfo() {
		String access_token = request.getParameter("access_token");
		String token_type = request.getParameter("token_type");
		String expires_in = request.getParameter("expires_in");
		request.setAttribute("access_token", access_token);
		request.setAttribute("token_type", token_type);
		request.setAttribute("expires_in", expires_in);
		return SAVEINFO;
	}
}